<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .father {
            width: 200px;
            height: 200px;
            background-color: pink;
            margin: 100px auto;
        }

        .son {
            width: 100px;
            height: 100px;
            background-color: purple;
        }
    </style>
</head>

<body>
    <div class="father">
        <div class="son"></div>
    </div>
    <script>
        var father = document.querySelector('.father');
        var son = document.querySelector('.son');
        //mouse  -> over 鼠标经过触发 会冒泡
        // enter 鼠标经过会触发 不会冒泡
        // 同理 leave 鼠标离开会触发 不会冒泡
        father.addEventListener('mouseleave', function () {
            console.log(11);
        })
    </script>
</body>

</html>